package com.cuitrip.im;

import android.content.Context;
import android.text.Spannable;
import android.text.SpannableString;
import android.view.View;
import android.view.ViewGroup;

import io.rong.imkit.model.ProviderTag;
import io.rong.imkit.model.UIMessage;
import io.rong.imkit.widget.provider.IContainerItemProvider;
import io.rong.message.DiscussionNotificationMessage;

/**
 * 自定义讨论组信息，隐藏该类信息
 * Created by ak
 */
@ProviderTag(
        messageContent = DiscussionNotificationMessage.class,
        showPortrait = false,
        centerInHorizontal = true,
        showSummaryWithName = false,
        hide = true
)
public class CtInfoSystemItemProvider extends IContainerItemProvider.MessageProvider<DiscussionNotificationMessage> {

    public CtInfoSystemItemProvider() {
    }

    public View newView(Context context, ViewGroup group) {
        View view = new View(context);
        view.setVisibility(View.GONE);
        return view;
    }

    @Override
    public void bindView(View v, int position, DiscussionNotificationMessage content, UIMessage message) {
    }

    @Override
    public Spannable getContentSummary(DiscussionNotificationMessage discussionNotificationMessage) {
        return new SpannableString("");
    }

    @Override
    public void onItemClick(View view, int i, DiscussionNotificationMessage discussionNotificationMessage, UIMessage uiMessage) {

    }

    @Override
    public void onItemLongClick(View view, int i, DiscussionNotificationMessage discussionNotificationMessage, UIMessage uiMessage) {

    }
}
